﻿using System.Configuration;

namespace SPSDeploy.Extensions.Configuration
{
    /// <summary>
    /// Application configuration section
    /// </summary>
    public class ApplicationSection : ConfigurationSection
    {

        #region Properties
        /// <summary>
        /// Section instance
        /// </summary>
        public static ApplicationSection Instance
        {
            get
            {
                return (ApplicationSection)ConfigurationManager.GetSection("extended.configuration");
            }
        }

        /// <summary>
        /// Search admin database
        /// </summary>
        [ConfigurationProperty("searchAdminDatabase")]
        public SearchAdminDatabaseElement SearchAdminDatabase
        {
            get
            {
                return (SearchAdminDatabaseElement)base["searchAdminDatabase"];
            }
        }

        /// <summary>
        /// Section mappings
        /// </summary>
        [ConfigurationProperty("mappings", IsDefaultCollection = false)]
        public MappingsCollection Mappings
        {
            get
            {
                return (MappingsCollection)base["mappings"];
            }
        }

        /// <summary>
        /// Section accounts
        /// </summary>
        [ConfigurationProperty("accounts", IsDefaultCollection = false)]
        public AccountsCollection Accounts
        {
            get
            {
                return (AccountsCollection)base["accounts"];
            }
        }
        #endregion

    }
}